import React from 'react'
import { useNavigate,Link } from 'react-router-dom'

export default function Home() {
  const navigate = useNavigate()
  return (
    <div>
      home
      <Link to={'../Login'}>去登录页</Link>
      <button onClick={()=>{navigate('../Login')}}>去登录页</button>
      <button onClick={()=>{navigate('../Login?id=123&name=huarry')}}>useSearchParams传参</button>
      <button onClick={()=>{navigate('../Login/123')}}>useSearchParams传参</button>
      </div>
    
     
  )
}
